def calculate_prime_factors(n):
    i = 2
    factors = []
    while i * i <= n:
        if n % i:
            i += 1
        else:
            n //= i
            factors.append(i)
    if n > i:
        factors.append(n)
    return factors
num = int(input(""))
a = calculate_prime_factors(num)
for b in a:
    print(b,end=" ")